Initilaise new cpu's processed-time value from cpu0's
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 10 Dec 2005 15:21:43 +0000 (16:21 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 10 Dec 2005 15:21:43 +0000 (16:21 +0100)
timestamp. The new cpu's timestamp is not initialised yet,
so should not be used.

Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c

index 88034beac3617b2b8f8b61390e4d9dd1035af0a4..969f8947b9cd13657eda0d461664b3acc8e0d22d 100644 (file)
@@ -872,8 +872,9 @@ void local_setup_timer(unsigned int cpu)
 
        do {
                seq = read_seqbegin(&xtime_lock);
+               /* Use cpu0 timestamp: cpu's shadow is not initialised yet. */
                per_cpu(processed_system_time, cpu) = 
-                       per_cpu(shadow_time, cpu).system_timestamp;
+                       per_cpu(shadow_time, 0).system_timestamp;
        } while (read_seqretry(&xtime_lock, seq));
 
        sprintf(timer_name[cpu], "timer%d", cpu);